package com.hzhq.contract.bean.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

/**
 * @author hzhq
 * @create 2021/3/17 11:45 上午
 * @email hzhq1255@163.com
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "admin")
public class Admin implements Serializable {

    @Id
    private ObjectId adminId;
    @ApiModelProperty(value = "管理员名称")
    @Field("admin_name")
    private String adminName;
    @ApiModelProperty(value = "管理员密码")
    @Field("password")
    private String password;
    @ApiModelProperty(value = "管理员电话")
    @Field("phone")
    private String phone;
    @ApiModelProperty(value = "是否被删除,1 删除 0 未删除")
    @Field("deleted")
    private Integer deleted;
    @ApiModelProperty(value = "注册时间")
    @Field("register_time")
    private Date registerTime;

}
